<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
  <head>
    
    <title>项目管理系统-项目列表</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="js/jQuery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			padding-top:70px;
			background-color: #C0DEED;
			background-image: url("img/pro-bg.png");
			background-repeat:no-repeat;
		}
		.newproject{
			margin-bottom: 20px;
			margin-left:25px;
		}
	
		.body-bgc{
			padding-top:20px;
			background-color:#bod4e5;
			background: url("img/wash-white-30.png") repeat scroll 0 0 transparent;
		}
	</style>
  </head>
  
  <body>
  <%@ include file="include/topbar.jsp" %>
  	<div class="container body-bgc">
  		<div class="span9">
  			<div class="project-list">
		   	 	<h1>项目列表</h1>
		 	</div>
		 	<hr/>
		 	<div class="newproject">
		 		<a class="btn btn-success" href="project.jspx?m=create">
			 		<i class="icon-plus icon-white"></i>
			 		开始一个新项目
		 		</a>
		 	</div>
  			<div id="accordion2" class="accordion">
  			<!-- 项目列表 -->
  			<c:if test="${fn:length(requestScope.projects) == 0}">
  				<div class="alert alert-info">
					你未参与任何项目  					
  				</div>
  			</c:if>
  			<c:forEach items="${requestScope.projects }" var="project">
	            <div class="accordion-group">
	              <div class="accordion-heading">
	                <a href="#collapse${project.id }" data-parent="#accordion2" data-toggle="collapse" class="accordion-toggle">
	              		<i class="icon-th"></i>
	              		  ${project.name }
	                </a>
	              </div>
	              <div class="accordion-body collapse" id="collapse${project.id }" style="height: 0px;">
	                <div class="accordion-inner">
	                 <ul class="nav nav-pills" style="margin-bottom:5px;border-bottom:1px solid #ccc;">
						      <li class=""><a href="project.jspx?m=begin&id=${project.id }">开始项目</a></li>
						      <li class=""><a href="#">编辑</a></li>
					  	  </ul>
							${project.desc }	                	 
	                </div>
	              </div>
	            </div>
            </c:forEach>
            <!-- 结束 -->
            
          </div>
  		</div>
  	</div>
  </body>
</html>
